package xju_5_6.springboot_5_6.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("`user`") //指定表的名字
public class User {
//    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private String name;
    private Integer age;
    private String email;

    @TableField(fill = FieldFill.INSERT)  // 添加时，自动填充
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE) //添加或更新 ，自动填充
    private LocalDateTime updateTime;

    // 逻辑删除字段
//    @TableLogic
    private Boolean deleted;
}
